<?php

namespace Yj\Constants;

use Yj\Constants\ConstantsCollector;
use Hyperf\Constants\Exception\ConstantsException;
use Hyperf\Utils\Str;

class BaseConstants
{

    public static function getKeys(){
        return array_keys(static::getConstants());
    }

    public static function getConstants(){
         $calledClass = get_called_class();
         return ConstantsCollector::get($calledClass)?:[];
    }

    public static function getValue($name,$type){
        return static::getConstants()[$name][$type];
    }

}